<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>
<%!   public String getArea(double r){
    if (r>0){
        double area=r*r*3.14;
        return""+area;
    }
    else {
        return ("半径"+r+"不能为大于0以外的数字,无法计算面积");
    }
}
%>
<%
<%
    String sideR=request.getParameter("sideR");
    double r=Double.parseDouble(sideR);
%>
<br><%=r%>
<br>圆的面积是:<%=getArea(r)%>
%>


